Autogenerated HTML docs for v1.8.2-135-g7b592
diff --git a/git-shell.html b/git-shell.html index 67ce350..4eb7936 100644 --- a/git-shell.html +++ b/git-shell.html
@@ -746,7 +746,9 @@ <h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<pre class="content"><em>git shell</em> [-c <command> <argument>]</pre> +<pre class="content"><em>chsh</em> -s $(command -v git-shell) <user> +<em>git clone</em> <user><code>@localhost:/path/to/repo.git</code> +<em>ssh</em> <user><code>@localhost</code></pre> <div class="attribution"> </div></div> </div> @@ -754,18 +756,93 @@ <div class="sect1"> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="paragraph"><p>A login shell for SSH accounts to provide restricted Git access. When -<em>-c</em> is given, the program executes <command> non-interactively; -<command> can be one of <em>git receive-pack</em>, <em>git upload-pack</em>, <em>git -upload-archive</em>, <em>cvs server</em>, or a command in COMMAND_DIR. The shell -is started in interactive mode when no arguments are given; in this -case, COMMAND_DIR must exist, and any of the executables in it can be -invoked.</p></div> -<div class="paragraph"><p><em>cvs server</em> is a special command which executes git-cvsserver.</p></div> -<div class="paragraph"><p>COMMAND_DIR is the path "$HOME/git-shell-commands". The user must have -read and execute permissions to the directory in order to execute the -programs in it. The programs are executed with a cwd of $HOME, and -<argument> is parsed as a command-line string.</p></div> +<div class="paragraph"><p>This is a login shell for SSH accounts to provide restricted Git access. +It permits execution only of server-side Git commands implementing the +pull/push functionality, plus custom commands present in a subdirectory +named <code>git-shell-commands</code> in the user’s home directory.</p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_commands">COMMANDS</h2> +<div class="sectionbody"> +<div class="paragraph"><p><em>git shell</em> accepts the following commands after the <em>-c</em> option:</p></div> +<div class="dlist"><dl> +<dt class="hdlist1"> +<em>git receive-pack <argument></em> +</dt> +<dt class="hdlist1"> +<em>git upload-pack <argument></em> +</dt> +<dt class="hdlist1"> +<em>git upload-archive <argument></em> +</dt> +<dd> +<p> + Call the corresponding server-side command to support + the client’s <em>git push</em>, <em>git fetch</em>, or <em>git archive --remote</em> + request. +</p> +</dd> +<dt class="hdlist1"> +<em>cvs server</em> +</dt> +<dd> +<p> + Imitate a CVS server. See <a href="git-cvsserver.html">git-cvsserver(1)</a>. +</p> +</dd> +</dl></div> +<div class="paragraph"><p>If a <code>~/git-shell-commands</code> directory is present, <em>git shell</em> will +also handle other, custom commands by running +"<code>git-shell-commands/<command> <arguments></code>" from the user’s home +directory.</p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_interactive_use">INTERACTIVE USE</h2> +<div class="sectionbody"> +<div class="paragraph"><p>By default, the commands above can be executed only with the <em>-c</em> +option; the shell is not interactive.</p></div> +<div class="paragraph"><p>If a <code>~/git-shell-commands</code> directory is present, <em>git shell</em> +can also be run interactively (with no arguments). If a <code>help</code> +command is present in the <code>git-shell-commands</code> directory, it is +run to provide the user with an overview of allowed actions. Then a +"git> " prompt is presented at which one can enter any of the +commands from the <code>git-shell-commands</code> directory, or <code>exit</code> to close +the connection.</p></div> +<div class="paragraph"><p>Generally this mode is used as an administrative interface to allow +users to list repositories they have access to, create, delete, or +rename repositories, or change repository descriptions and +permissions.</p></div> +<div class="paragraph"><p>If a <code>no-interactive-login</code> command exists, then it is run and the +interactive shell is aborted.</p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_example">EXAMPLE</h2> +<div class="sectionbody"> +<div class="paragraph"><p>To disable interactive logins, displaying a greeting instead:</p></div> +<div class="paragraph"><p>+</p></div> +<div class="listingblock"> +<div class="content"> +<pre><code>$ chsh -s /usr/bin/git-shell +$ mkdir $HOME/git-shell-commands +$ cat >$HOME/git-shell-commands/no-interactive-login <<\EOF +#!/bin/sh +printf '%s\n' "Hi $USER! You've successfully authenticated, but I do not" +printf '%s\n' "provide interactive shell access." +exit 128 +EOF +$ chmod +x $HOME/git-shell-commands/no-interactive-login</code></pre> +</div></div> +</div> +</div> +<div class="sect1"> +<h2 id="_see_also">SEE ALSO</h2> +<div class="sectionbody"> +<div class="paragraph"><p>ssh(1), +<a href="git-daemon.html">git-daemon(1)</a>, +contrib/git-shell-commands/README</p></div> </div> </div> <div class="sect1"> @@ -778,7 +855,7 @@ <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> -Last updated 2011-11-15 13:45:02 PST +Last updated 2013-03-21 15:47:21 PDT </div> </div> </body>